Recent searches

in

routes[*]

On this page

A single route rule for redirects or rewrites.

Appears in

└── routes
    └── [*]

Type

Object

Properties

forcedboolean#

When true, the redirect will be applied even if a file exists at the from path.

Defaults to: false

Appears in: routes[*].

fromstring Required#

The URL pattern to match incoming requests against. CloudCannon routing supports glob-style patterns.

Appears in: routes[*].

statusnumber#

The HTTP status code for this redirect rule. When using 200, 404, and 410 status codes, to must refer to a path on the same Site.

Defaults to: 301

Allowed values: 200 301 302 303 307 308 404 410

Appears in: routes[*].

substitutionsboolean#

When true, captured segments from glob patterns in from will be substituted into the to path.

Defaults to: true

Appears in: routes[*].

tostring Required#

The destination path or URL for this route. Can be a relative path on the same site or an absolute URL for external redirects.

Appears in: routes[*].

Open in a new tab